
#ifndef _DEBUG_H_
#define _DEBUG_H_


#define  DEBUG_OFF          0
#define  DEBUG_FATAL        1
#define  DEBUG_ERROR        2
#define  DEBUG_WARN         3
#define  DEBUG_INFO         4
#define  DEBUG_DEBUG        5
#define  DEBUG_TRACE        6
#define  DEBUG_ALL          7


extern int g_debug_print_level;


#define MY_DEBUG_LOG(level, format, ...)         \
{                                                   \
        if ((g_debug_print_level > DEBUG_OFF) && (level <= g_debug_print_level))           \
        {                                           \
            printf(format, ##__VA_ARGS__);            \
        }                                           \
}


#endif

